function getCurrentPagesApi(){
	var pages = getCurrentPages().pop();
	var options = pages.options;
	// console.log(Object.keys(options).length);
	if(Object.keys(options).length == 0){
		var route = '/' + pages.route
	}else{
		var route = '/' + pages.route + "?";
	}
	for(var key in options){
		route += key + "=" + options[key] + "&"
	}
	if(Object.keys(options).length != 0){
		route = route.substring(0, route.length-1)
	}
	return route
}

module.exports = {
	getCurrentPagesApi: getCurrentPagesApi
}